import java.util.StringJoiner;

public class Test {

    public static void main(String[] args) {

        int[] arr = {1, 2, 3};
        build(arr);
    }

    public static void build(int[] p) {

        StringJoiner t = new StringJoiner(", ", "[", "]");
        for (int i = 0; i < p.length; i++) {
            t.add(p[i] + "");
        }
        System.out.println(t);
    }
}
